package company.alibaba;

import java.math.BigInteger;
import java.util.Scanner;

public class Aili {

    public static BigInteger nn = new BigInteger(String.valueOf(1));
    public static BigInteger now = new BigInteger(String.valueOf(1));

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextInt();
        BigInteger result = new BigInteger(String.valueOf(0));
        nn = unRecursion(n);
        System.out.println(nn);

        for (long i = 1; i <= n; i++) {
            result = result.add(nn.divide(now));
            now = now.multiply(new BigInteger(String.valueOf(i)));
        }
    }

    public static BigInteger unRecursion(long num){
        BigInteger jiecheng = new BigInteger(String.valueOf(1));
        if(num == 0){
            return new BigInteger(String.valueOf(1));
        }
        for (long i = 1; i <= num; i++) {
            jiecheng = jiecheng.multiply(new BigInteger(String.valueOf(i)));
        }
        return jiecheng;
    }
}
